﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using XMFramework.Forms.Pages;
using XMFramework.Forms.Pages.Cargos;
using XMFramework.Forms.Pages.Devices;
using XMFramework.Forms.Pages.Molds;
using XMFramework.Forms.Pages.Orders;
using XMFramework.Forms.Pages.Products;
using XMFramework.Forms.Pages.Storage;
using XMFramework.Forms.Pages.Users;

namespace XMFramework
{
    public partial class XMFramework : UIForm
    {
        public XMFramework()
        {
            InitializeComponent();
            //****************uiNavMenuAside页面调用******************
            //工作平台
            int pageIndexAside = 100;
            TreeNode parent = uiNavMenuAside.CreateNode("工作平台", 61449, 24, pageIndexAside); //100
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FWork(), ++pageIndexAside)); //
            //示例设置某个节点的小红点提示
            uiNavMenuAside.ShowTips = true;
            uiNavMenuAside.SetNodeTipsText(uiNavMenuAside.Nodes[0], "8", Color.Red, Color.White);
            uiNavMenuAside.SetNodeTipsText(parent.Nodes[0], " ", Color.Lime, Color.White);

            
            //订单管理
            pageIndexAside = 200;
            parent = uiNavMenuAside.CreateNode("订单管理", 62104, 24, pageIndexAside); //200
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FOrder(), ++pageIndexAside)); //201


            //生产管理
            pageIndexAside = 300;
            parent = uiNavMenuAside.CreateNode("生产管理", 61474, 24, pageIndexAside); //300
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FProductionOrder(), ++pageIndexAside)); //301
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FProduct(), ++pageIndexAside)); //302
                                                                                              

            //工艺管理
            pageIndexAside = 400;
            parent = uiNavMenuAside.CreateNode("工艺管理", 61930, 24, pageIndexAside);
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FRecipe(), ++pageIndexAside));


            //模具管理
            pageIndexAside = 500;
            parent = uiNavMenuAside.CreateNode("模具管理", 62136, 24, pageIndexAside);
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FMold(), ++pageIndexAside));


            //设备管理
            pageIndexAside = 600;
            parent = uiNavMenuAside.CreateNode("设备管理", 61878, 24, pageIndexAside);
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FDevice(), ++pageIndexAside));


            //货运管理
            pageIndexAside = 700;
            parent = uiNavMenuAside.CreateNode("货运管理", 61649, 24, pageIndexAside);
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FCargo(), ++pageIndexAside));

            //仓储管理
            pageIndexAside = 800;
            parent = uiNavMenuAside.CreateNode("仓储管理", 61852, 24, pageIndexAside);
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FStorage(), ++pageIndexAside));

            //用户管理
            pageIndexAside = 900;
            parent = uiNavMenuAside.CreateNode("用户管理", 61447, 24, pageIndexAside);
            uiNavMenuAside.CreateChildNode(parent, AddPage(new FUser(), ++pageIndexAside));//用户查询





            //****************uiNavBarHeade页面调用******************
            int pageIndexHeader = 10000;
            TreeNode parentHeade = uiNavBarHeade.CreateNode("工作平台", 61449, 24, pageIndexHeader); //10000    
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FWork(), ++pageIndexHeader)); //

            pageIndexHeader = 10100;
            parentHeade = uiNavBarHeade.CreateNode("生产管理", 61474, 24, pageIndexHeader); //
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FProduct(), ++pageIndexHeader)); //

            pageIndexHeader = 10200;
            parentHeade = uiNavBarHeade.CreateNode("工艺管理", 61930, 24, pageIndexHeader); //
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FRecipe(), ++pageIndexHeader)); //

            pageIndexHeader = 10300;
            parentHeade = uiNavBarHeade.CreateNode("货运管理", 61649, 24, pageIndexHeader); //
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FCargo(), ++pageIndexHeader)); //

            pageIndexHeader = 10400;
            parentHeade = uiNavBarHeade.CreateNode("模具管理", 62136, 24, pageIndexHeader); //
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FMold(), ++pageIndexHeader)); //

            pageIndexHeader = 10500;
            parentHeade = uiNavBarHeade.CreateNode("设备管理", 61878, 24, pageIndexHeader); //
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FDevice(), ++pageIndexHeader)); //

            pageIndexHeader = 10600;
            parentHeade = uiNavBarHeade.CreateNode("用户管理", 61447, 24, pageIndexHeader); //
            uiNavBarHeade.CreateChildNode(parentHeade, AddPage(new FUser(), ++pageIndexHeader)); //







        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
